﻿namespace DataStructure;

public interface ISortedList<Key>
{
    int Count { get; }
    bool IsEmpty { get; }
    Key Min();
    Key Max();
    int Rank(Key key);
    bool Add(Key key);
    bool Remove(Key key);
    Key Select(int k);
    bool Contains(Key key);
    Key Floor(Key key);
    Key Ceiling(Key key);
}

public interface ISortedList<Key, Value> : ISortedList<Key>
{
    Value Get(Key key);
    void Set(Key key, Value newValue);
    void Add(Key key, Value value);
}
